package cn.com.smart.module.tool.database.service.serviceImpl;

import cn.com.smart.module.tool.database.domain.tables;
import cn.com.smart.module.tool.database.mapper.columnsMapper;
import cn.com.smart.module.tool.database.mapper.tablesMapper;
import cn.com.smart.module.tool.database.service.tableservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class tableserviceImpl implements tableservice {

    @Autowired
    private tablesMapper tablesMapper;

    @Autowired
    private columnsMapper columnsMapper;

    /**
     * 根据数据库名查询所有表名
     * @return
     */
    @Override
    public List<tables> tablesBylibrary() {
        return tablesMapper.tablesBylibrary(columnsMapper.dbName());
    }
}
